hilitedItemIndex
Type
property
Summary
Specifies the item that will be hilited on a PolyList control.
Syntax
set the hilitedItemIndex of widget to <integer>
get the hilitedItemIndex of widget
Description
Use hilitedItemIndex to get or set the currently hilited item.
The hilitedItemIndex property manages the selection of items in a PolyList. Here's how it works:
- If the
hilitedItemIndex
is set to zero or left empty, no items will be selected in the PolyList. - If you set the
hilitedItemIndex
to a value that exceeds the number of elements in the PolyList, the selection will default to the last element in the PolyList. - In cases where multiple items are selected, the
hilitedItemIndex
will return a comma-separated list of the selected items. - Use
-1
to select all.
This way, you can easily control and retrieve the selection state of the
PolyList using the hilitedItemIndex
property.
Examples
set the hilitedItemIndex of widget "PolyList" to 3
set the hilitedItemIndex of widget "PolyList" to 0
set the hilitedItemIndex of widget "PolyList" to infinity